home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / etc / init.d / arpwatch < prev    next >
Text File  |  2006-06-30  |  788b  |  34 lines

  1. #!/sbin/runscript
  2. # Copyright 1999-2006 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. # $Header: /var/cvsroot/gentoo-x86/net-analyzer/arpwatch/files/arpwatch.init,v 1.8 2006/01/22 17:43:41 vanquirius Exp $
  5.  
  6. depend() {
  7.     need net
  8.     use cupsd
  9. }
  10.  
  11. start() {
  12.     for IFACE in ${IFACES}
  13.     do
  14.         ebegin "Starting arpwatch on ${IFACE}"
  15.         DATAFILE=/var/lib/arpwatch/${IFACE}.dat
  16.         if [ ! -f ${DATAFILE} ]; then
  17.             touch ${DATAFILE}
  18.         fi
  19.         if [ -z ${ARPUSER} ]; then
  20.             setsid /usr/sbin/arpwatch -i $IFACE -f /var/lib/arpwatch/$IFACE.dat ${OPTIONS}
  21.             eend $?
  22.         else
  23.             setsid /usr/sbin/arpwatch -i $IFACE -u ${ARPUSER} -f /var/lib/arpwatch/$IFACE.dat ${OPTIONS}
  24.             eend $?
  25.         fi
  26.     done
  27. }
  28.  
  29. stop() {
  30.     ebegin "Stopping arpwatch"
  31.     killall arpwatch > /dev/null
  32.     eend $?
  33. }
  34.